package soundsystem;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;

@Configuration
public class CDPlayerConfig {
  
  @Bean
  public CompactDisc compactDisc() {
    return new SgtPeppers();
  }
  
  @Bean
  public CDPlayer cdPlayer_(CompactDisc compactDisc) {
    return new CDPlayer(compactDisc);
  }
  /*
  方式二：
  @Bean
  public CDPlayer cdPlayer() {
    return new CDPlayer(compactDisc());
  }*/


}
